<html>
<head><meta charset="utf-8"><title>RUSTC_LOG limit · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/RUSTC_LOG.20limit.html">RUSTC_LOG limit</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="177117898"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/RUSTC_LOG%20limit/near/177117898" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Paul Faria <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/RUSTC_LOG.20limit.html#177117898">(Oct 02 2019 at 03:09)</a>:</h4>
<p>Is there a way to limit <code>RUSTC_LOG</code> to only output a specific level and not anything below it? For example, I want to collect logs at <code>rustc::mir</code>, but not <code>rustc::mir::tcx</code>. Is that possible?</p>



<a name="177119385"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/RUSTC_LOG%20limit/near/177119385" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dylan MacKenzie (ecstatic-morse) <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/RUSTC_LOG.20limit.html#177119385">(Oct 02 2019 at 03:50)</a>:</h4>
<p>pipe stderr to <code>grep -v 'rustc::mir::tcx'</code>?</p>



<a name="177136866"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/RUSTC_LOG%20limit/near/177136866" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/RUSTC_LOG.20limit.html#177136866">(Oct 02 2019 at 10:12)</a>:</h4>
<blockquote>
<p>Is there a way to limit <code>RUSTC_LOG</code> to only output a specific level and not anything below it? For example, I want to collect logs at <code>rustc::mir</code>, but not <code>rustc::mir::tcx</code>. Is that possible?</p>
</blockquote>
<p>I've often wanted a way to do this. I wonder if we could hijack a simple notation, like <code>RUSTC_LOG=rustc::mir::self</code> would be the say to say that I only want <em>that</em> module, not its children.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>